package models

/**
构造响应体
*/
type Response struct {
	Code    int
	Message string
	Data    interface{}
}

func InitResponse(code int, message string, data interface{}) (resp Response) {
	resp.Code = code
	resp.Message = message
	resp.Data = data
	return
}

func Success(data interface{}) (resp Response) {
	resp.Code = 200
	resp.Message = "Success"
	resp.Data = data
	return
}
